<template>
  <div>
    <h2 class="title">我是标题</h2>
    <p>{{message}}</p>
    <button @click="btnClick">按钮</button>
    
    <hr>
    <!-- 使用组件 -->
    <Cpn></Cpn>
  </div>
</template>

<script>
// 不能简写，没有配置webpack
import Cpn from './Cpn'

export default {
  name: 'App',
  components: {
    Cpn
  },
  data() {
    return {
      message: "I don't wanna see you anymo"
    }
  },
  methods: {
    btnClick() {
      console.log("按钮事件触发")
    }
  }
}
</script>

<style>
  .title {
    color: green;
  }
</style>